using System;
using System.Collections.Generic;

namespace ProyectoSelva.Util
{
    public class FormUtils
    {
        public static IList<T> AddFirst<T>(IList<T> list,T first)
        {
            if (list==null)
            {
                throw new ArgumentException("El Listado debe ser diferente de nulo");
            }
            IList<T> newList = new List<T>(1+list.Count);
            newList.Add(first);
            foreach (var value in list)
            {
                newList.Add(value);
            }
            return newList;
        }
    }
}